import axios from 'axios';
import queryString from 'qs';
import _ from 'lodash';

export const getNotifyList = filter => {
  const formatedFiler = _.pickBy(filter, value => Boolean(value));
  const query = queryString.stringify(formatedFiler);
  return axios(`/api/notice/listNotice?${query}`);
};

export const modifyNotifyStatus = body => {
  return axios.post('/api/notice/markRead', body);
};

export const deleteReadNotify = body => {
  return axios.post('/api/notice/deleteRead', body);
};
